home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / shazam11.zip / DLGDSN.DOC < prev    next >
Text File  |  1990-12-03  |  8KB  |  265 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                                             December 1, 1990
  9.  
  10.                               DLGDSN Version 1.0
  11.  
  12.                   A Dialogbox Design Program for Turbo Vision
  13.  
  14.                     (C) Copyright 1990 by L. David Baldwin.  
  15.                              All Rights Reserved.
  16.  
  17.   Further copyright information given below
  18.  
  19.  
  20.   OVERVIEW
  21.  
  22.   DLGDSN takes some of the pain out of designing dialog boxes for Borland's 
  23.   new Turbo Vision package.  With DLGDSN, dialog views can be easily added, 
  24.   edited, rearranged, and the dialogbox itself sized, moved, etc.  Once the 
  25.   design is satisfactory, DLGDSN can produce source code to be included in 
  26.   your program or a resource file for use by your program.
  27.  
  28.  
  29.   REQUIREMENTS
  30.  
  31.     Borland's Turbo Pascal(R) version 6.0
  32.     Some familiarity with the Turbo Vision package
  33.     A mouse is desirable
  34.  
  35.   The following files are supplied:
  36.  
  37.   DLGDSN.EXE    The design program
  38.   DLGHLP.HLP    Online help file
  39.   DLGDSN.DOC    This one
  40.   TESTCASE.PAS  A test program to check the source code produced by DLGDSN
  41.  
  42.  
  43.   DESIGNING A DIALOG BOX
  44.  
  45.   DLGDSN has three modes of operation:
  46.  
  47.     Design Mode
  48.  
  49.     DLGDSN begins in design mode and this is the mode that you use for all 
  50.     layout work and editing.  In design mode, the dialogbox doesn't look or 
  51.     act quite like it will in the final design.  For one thing, there is a 
  52.     'canvas' background which helps show the actual space occupied by the 
  53.     views.  Also, to facilitate editing, all views can be selected using the 
  54.     mouse or tab key though some won't be selectable in an actual dialogbox.
  55.  
  56.     Try Mode
  57.  
  58.     Try mode is entered using the F9 key.  In try mode, the dialogbox behaves 
  59.     as it's supposed to.  You can check the Tab order, make temporary 
  60.  
  61.  
  62.                                       1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.     entries, and push buttons to actually check how things will work.  Exit 
  75.     try mode with the escape key or click on the close box.
  76.  
  77.     Ordering Mode
  78.  
  79.     Ordering mode allows you to change the Tab order of your dialogbox.  The 
  80.     method for doing this is discussed further below.  The F8 key toggles you 
  81.     into and out of ordering mode.
  82.  
  83.   While there is no fixed way to design a dialogbox, here's one suggested 
  84.   sequence:
  85.  
  86.   1.In design mode, work with the dialogbox fully zoomed.
  87.  
  88.   2.From the Add menu, select a view to add.  This will bring up a dialogbox 
  89.     where you can enter the necessary information.  Use the online help (F1 
  90.     key) if you have a question as to what goes in a particular field.  When 
  91.     the OK button is pushed, the view will appear somewhere in the (fully 
  92.     zoomed) design box.  The view is then positioned by dragging it with the 
  93.     mouse, or by using the arrow keys.  Work in the upper left corner of the 
  94.     box.
  95.  
  96.   3.Continue adding views as desired.  At any time, views can be repositioned 
  97.     with the mouse or arrow keys.  If something other than position needs 
  98.     changing, select the view and from the Edit menu choose Edit Selected (or 
  99.     use F7).  This will bring up its dialogbox for changes.
  100.  
  101.   4.When all the views have been added and positioned, size the box to fit 
  102.     and move it to the desired location on the desktop.  Be sure and add a 
  103.     title (Dialog Title from the Edit menu).
  104.  
  105.   5.Enter Try Mode with the F9 key and test the dialogbox.  Be sure to check 
  106.     how the views sequence using the Tab key.  Exit Try mode with Esc or 
  107.     click on the close box.
  108.  
  109.   6.If the Tab sequence needs changing, use F8 to enter ordering mode.  With 
  110.     the mouse, click on each view to establish the desired order.   Exit back 
  111.     to design mode with F8.
  112.  
  113.     Changing the sequence without a mouse is a little more complicated.  Use 
  114.     the Tab key to select (highlight) the next view to be sequenced.  Then 
  115.     press the Enter key to enter the selected view into the sequence.  After 
  116.     all views have been entered, exit back to design mode with F8.
  117.  
  118.     Some views (such as Static Text, Labels, Scrollbars) don't enter into the 
  119.     tab sequence of a dialogbox.  You can order these if it's convenient, but 
  120.     the order won't effect the final results.  
  121.  
  122.     Be sure to recheck the tab order in Try mode.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                       2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.   7.This is a good time to save your work.  Choose Save or Save As from the 
  141.     File menu to create or update a .DLG file.  Any file with the same name 
  142.     will be renamed with a .BKP extension.
  143.  
  144.   8.To create source code for your dialogbox, choose Write Source from the 
  145.     Operations menu and choose a filename (.SRC is the default extension).  
  146.     The source code produced will consist of a dialogbox definition function 
  147.     and a data record with fields matching those required by the dialogbox's 
  148.     SetData and GetData methods.
  149.  
  150.     The .SRC file generated may be inserted directly into TESTCASE.PAS (at 
  151.     the line of asterisks) to provide a program to test the dialogbox.
  152.  
  153.   9.To generate a resource file or add the new dialogbox to an existing 
  154.     resource or EXE file, choose Write Resource from the Operation menu.  
  155.     Both a filename and a resource ID name will be requested.  If the file 
  156.     already exists, it will be renamed with a .BKP extension.  If the 
  157.     existing file is a resource or EXE file, it will be copied, and the new 
  158.     resource added to the copy.  Any existing resource with the same ID will 
  159.     be deleted.  Note that the resource ID name is case sensitive.
  160.  
  161.  
  162.   SOME DETAILS
  163.  
  164.   Pointer Names
  165.  
  166.   Many of the Add/Edit dialogboxes have a field labeled 'Pointer Name'.  By 
  167.   default, this field contains the standard Turbo Vision pointer symbol for 
  168.   the view.  This field exists for situations where it may be desirable to 
  169.   use a derived view which doesn't differ much from its standard view parent.  
  170.   The pointer name entered here will be the one used when generating the 
  171.   source code for the dialogbox.  
  172.  
  173.   Help Context
  174.  
  175.   Many of the Add/Edit dialogboxes also have fields labeled Help Context and
  176.   Value.  By default, these contain hcNoContext and 0.  DLGDSN uses the help 
  177.   context ID when generating source code and the value when producing a 
  178.   resource.
  179.  
  180.   For small projects, it may be convenient just to enter this information by 
  181.   hand.  However, if you're using Borland's demo help compiler, TVHC, DLGDSN 
  182.   can work with the help definition file it produces.  To do this, choose 
  183.   Load Help ctx file from the Options menu and supply the filename of the 
  184.   help definition file.  Then clicking on the '*' box next to the help 
  185.   context field (or typing '*' in the field) will bring up a pick list of the 
  186.   definitions from which to choose.
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                       3
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.   COPYRIGHT
  207.  
  208.   Documentation and Program (C) Copyright 1990 by L. David Baldwin.  
  209.   All Rights Reserved.
  210.  
  211.   DLGDSN may be copied and distributed freely by individuals to friends and 
  212.   acquaintances providing that no fee is charged and it is not part of a 
  213.   package for which a charge is made.
  214.  
  215.  
  216.   Source code for DLGDSN is available for $15 (need not be sent in advance).
  217.   Also please report any problems, suggestions, etc.
  218.  
  219.   Contact me by Compuserve (the best way) or at one of the addresses below.
  220.  
  221.   Dave Baldwin
  222.   CompuServe ID #76327,53.
  223.  
  224.   22 Fox Den Rd.,
  225.   Hollis, NH 03049        (Summer)
  226.   (603) 465-7857
  227.  
  228.   144 13th St. East,
  229.   Tierra Verde, FL 33715  (Winter, of course)
  230.   (813) 867-3030
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                       4
  261.  
  262.  
  263.  
  264.  
  265.